package com.key.mapper;

import com.key.common.dto.ReturnDTO;
import com.key.common.dto.WithdrawalDTO;
import com.key.common.vo.AssetsTVO;
import com.key.entity.Assets;
import com.key.entity.ReturnAssets;
import com.key.entity.WithdrawalAssets;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author wen
 * @create 2023-02-22 15:22
 */
public interface ReturnAssetsMapper {
    //添加一个归还单据
    int insertReturn(ReturnAssets returnAssets);

    //依据单号删除
    int deleteReturnAssetsByReturnNumber(@Param("returnNumber") String returnNumber);

    //将归还单据与相关资产关联
    int updateReturnAndAssets(@Param("returnNumber") String returnNumber, @Param("borrowNumber") String borrowNumber);

    //删除归还与资产的关联，实际为修改
    int deleteReturnNumberAndAssets(@Param("returnNumber")String returnNumber);

    //依据条件修改单据
    int updateReturnAssets(ReturnDTO returnDTO);

    //依据条件查询归还单
    List<ReturnAssets> selectReturn(ReturnDTO returnDTO);

    List<Assets> selectAssetsByReturnAssets(@Param("returnNumber") String returnNumber);

    List<AssetsTVO> selectAssetsTVOByReturnAssets(@Param("returnNumber") String returnNumber);

}
